const { SendEmailCommand, SESClient } = require("@aws-sdk/client-ses");
const sesClient = new SESClient({
  region: "us-west-2",
  credentials: {
    accessKeyId: "AKIAQOEHMNZYCADHDDCI",
    secretAccessKey: "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",
  },
});
(async () => {
  const params = {
    Source: '"BitTopup Support" <info@bytetopup.com>', // 发件人邮箱
    Destination: {
      // ToAddresses: [user_email], // 收件人邮箱列表
      ToAddresses: ["555jaywang666@gmail.com"], // 收件人邮箱列表
    },
    Message: {
      Subject: {
        Data: `[BitTopup] Please verify your email address`,
      },
      Body: {
        Text: {
          Data: `Your Account Has Been Created - Default Password Information

Dear 123,
We are pleased to inform you that your account has been successfully created. By default, your password is set to: 123 (which is the same as your email address).
If you wish to change your password, please visit https://bittopup.com/sso/login and click the "Forgot Password" button to reset your password.
If you encounter any issues or need further assistance, feel free to contact us.
Thank you for choosing our service.

Best regards,
The BitTopup Team`,
        },
      },
    },
  };
  const data = await sesClient.send(new SendEmailCommand(params), {
    requestTimeout: 5000,
  });
  console.log(data);
})();

// 记录已发送的邮箱
// recordSentEmail(user_email);
